{% extends 'frontend/common/basic_list.html' %}

{% block list_title %}
    机房等级
{% endblock %}

{% block list_filter %}
    <div class="col-sm-3">
        <div class="input-group">
            <input type="text" name="name__contains" placeholder="机房等级"
                   value="{{ kwargs.name__contains }}"
                   class="input-sm form-control">
        </div>
    </div>
    <div class="col-sm-4">
        <div class="input-group">
            <button type="submit" class="btn btn-sm btn-primary"><i class="fa fa-search"></i> 搜索</button>
            &nbsp;
            <a href="/frontend/cmdb/idc_level_list/idc_level_add/"
               class="btn btn-sm btn-success"><i class="fa fa-plus"></i> 新增</a>
            &nbsp;
            <a href="javascript:void(0)"
               onclick="deleteBatch()"
               class="btn btn-sm btn-danger"><i class="fa fa-trash"></i> 批量删除</a>
        </div>
    </div>
{% endblock %}

{% block list_content %}
    <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
        <thead>
        <tr>
            <th><input id="checkall" type="checkbox" class="i-checks"></th>
            <th style="width: 10%;">名称</th>
            <th>描述</th>
            <th style="width: 15%;">创建时间</th>
            <th style="width: 15%;">更新时间</th>
            <th style="width:15%;">操作</th>
        </tr>
        </thead>
        <tbody>
        {% for o in result_list %}
            <tr>
                <td>
                    <input type="checkbox" class="i-checks icheck" id="{{ o.id }}" name="input[]">
                </td>
                <td>{{ o.name }}</td>
                <td>{{ o.comment }}</td>
                <td>{{ o.create_time }}</td>
                <td>{{ o.update_time }}</td>
                <td>
                    <a href="/frontend/cmdb/idc_level_list/{{ o.id }}/idc_level_edit/"
                       class="btn  btn-sm btn-info"><i class="fa fa-edit"></i>编辑</a>
                    <a href="/frontend/cmdb/idc_level_list/{{ o.id }}/delete_entity/"
                       class="btn  btn-sm btn-danger"><i class="fa fa-trash"></i>删除</a>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
{% endblock %}